Telemetry: Fail initialization if cache file cannot be opened#1287
Open
kkanas wants to merge 2 commits into
Open
Telemetry: Fail initialization if cache file cannot be opened#1287kkanas wants to merge 2 commits into
kkanas wants to merge 2 commits into
Conversation
If the cache file cannot be opened, fail initialization early. Otherwise telemetry events are not persisted and never reach the Aria backend. Signed-off-by: Krzysztof Kanas <kkanas@microsoft.com>
…ruption ILogManager returned by CreateLogManager is owned and tracked by LogManagerProvider, not by direct delete. The previous implementation used std::unique_ptr with the default deleter for ILogManager. That called delete directly, bypassing provider-managed teardown and leaving stale provider state for the same manager name. On the next test run, creating a manager with the same name could reuse corrupted internal state, showing a partially destructed object in gdb, including a null DebugEventDispatcher vptr. Align destruction with SDK ownership rules. Call FlushAndTeardown on the manager, then destroy it via LogManagerProvider::DestroyLogManager. Clear local pointers after teardown. Signed-off-by: Krzysztof Kanas <kkanas@microsoft.com>
b9e578b to
eb84257
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the cache file cannot be opened, fail initialization early. Otherwise telemetry events are not persisted and never reach the Aria backend.
Description
Describe your changes in as much detail as possible. Provide a link/reference to the issue solved with this request if any.
Checklist
devbranch prior to this PR submission.devbranch.